Events/Spell
__NOEDITSECTION__ : Note that this page is automatically generated; editing it is pointless. To edit event descriptions, edit the entries in the alphabetical pages, e.g. Events/A, Events/B, etc. Changes there will be copied over to here within a few hours. Spell related events Fired whenever a buff or debuff wears off of a mob, npc, or another player. Does not fire for party members. Examples: Thorns, Trueshot Aura, Recently Bandaged. arg1 is the full chat text, i.e. "Thorns fades from Someguy." Fired whenever a buff or debuff wears off - examples, Prowl, Mark of the Wild, Cat Form, or Disarm. arg1 is the full chat text, i.e. "Prowl fades from you." Fired when a mob begins casting a beneficial spell and again when the casting is completed. arg1 is the full combat chat text. Examples: Mob begins to cast Heal. Mob's Heal heals Mob for 20. Fired when a creature begins to cast a damage spell or when a creature casts a damage spell on a raid member who is not in your group. Also triggered when a pet is damaged by a creature's spell. Ex: Ragnaros' Wrath of Ragnaros hits PlayerName for 1000. Fired when a mob completes casting a harmful spell on you. (The message for the mob beginning to cast is given by CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE.) ;arg1: full combat chat text and includes results of the cast or skill use (e.g. hit, resist, dodge). Examples: : Mob's Poison hits you for 10. : Mob's Melee Special was dodged. : Mob's Nuke was resisted. Fired when a buff (or possibly item) damages an opponent in response to an action... IE Thorns. Fired when you fail to successfully cast a spell, for one of several reasons. arg1 is the full combat chat text and includes the reason. Examples: You fail to cast Heal: Interrupted. You fail to perform Bear Form: Not enough mana. Discovered a bug with this event as of v1.8. You can use CHAT_MSG_FRIENDLYPLAYER_DAMAGE to check for "Bob begins to cast Firebolt." However, if Bob joins your party, it does not show up in CHAT_MSG_SPELL_PARTY_DAMAGE as one would expect. It shows up in CHAT_MSG_SPELL_HOSTILEPLAYER_DAMAGE. This seems to only be the case for "begins to cast". Other damage messages properly show up under CHAT_MSG_SPELL_PARTY_DAMAGE. Fired when a mob gains an "insta-cast" beneficial effect. arg1 is the full combat chat text. Examples: Mob gains Defensive Stance. Mob gains Rushing Charge. Mob gains Demon Skin. Example: : Highland Strider suffers 8 Fire damage from your Fireball. Also records other people's DoT's, whether you are grouped or not, in combat or not. Fired when a non-hostile player gains a "buff" effect. ;arg1: the full combat chat text. Examples: : Someguy gains Arcane Intellect. : Someguy gains Aspect of the Pack. : Someguy gains Felsteed. For some weird reason, this event is fired when someone heals yourself or another player, eg "Priest's Flash Heal critically heals you for 2342" Haven't tested any other conditions as of yet. Example: : Awauna gains Power Word: Shield. Fired when a buff is cast on self. (Unknown if external buff triggers this). ;arg1: full combat text Example: : "You gain BuffName." Also called for each "tick" of recurring effects, such as "heal-over-time" spells. Example: You gain 10 health from Rejuvenation. --Syllani Fired (possibly among other times) when you are debuffed - so Disarm, Silenced, etc. I know the name doesn't match, but if you want to verify, enable printing this in your chat log. Get into combat and get debuffed. After combat, scroll back up, and while the debuff message is onscreen, change the chat color of this message, and you will see it change... Very strange. I assume this is named after poisons or diseases, but I haven't actually tested if those trigger this. See CHAT_MSG_SPELL_AURA_GONE_SELF if you want to know when it wears off (both buffs and debuffs). This is accurate as of US Release 1.2.4 (4222), tested by hacking Scrolling Combat Text. ;arg1: full text of the debuff message, e.g. "You are Disarmed." This is also fired during the Gnomish Death Ray's channel. This is indeed triggered by poison / disease. arg1 messages in the form of: "You suffer 3 damage from Scorpid's Poison" or "You are afflicted by Something" come from this event. --Syllani Fired when you cast a beneficial spell. arg1 is the full combat chat text. Examples: Your Heal heals you for 50. Your Regrowth critically heals Someguy for 100. UnitHealth(...) is not updated when this event occours, it is possible to determine the exact overheal with something like this: Overheal = HealFromCombatChat - (UnitHealthMax(...) - UnitHealth(...)); Fired whenever you cast a damage-dealing spell. arg1 holds the exact same string that is posted to the Combat Log. (eg. "Your Fireball hits Snivvle for 842.") Also fired when your spell does not actually take effect; ie. if it is resisted, or if the target is immune. A "resist" message is "Your Banish was resisted by Felguard Elite." while an "immune" message is of the format "Your Fire Blast failed. Firelord is immune." Fired when the spell being cast is changed. Fired when a new spell/ability is added to the spellbook. e.g. When training a new or a higher level spell/ability. ;arg1: Number of the tab which the spell/ability is added to Fired when a spellcaster begins channelling. Removed in 2.0 ; arg1 : Duration (in milliseconds) ; arg2 : Spell Name On version 1.2.1, this event doesnt seem to work. As of 1.10, replaces both the final SPELLCAST_CHANNEL_UPDATE (arg1 0) and SPELLCAST_STOP for channeled spells. Removed in 2.0 Fired when a channelling spell is updated. Removed in 2.0 ; arg1 : remaining Duration (in milliseconds) Fired when a spellcast duration is increased. Removed in 2.0 ; arg1 : Disruption time Fired when a spell fails. Will correctly fire for spells failing due to lack of mana as of 1.11. Removed in 2.0 Fired when a spellcast is interrupted. Removed in 2.0 Fired when a spellcast is begun. This event seems to work if the spell has a casting time. For instant, there is no SPELLCAST_START but SPELLCAST_STOP. Removed in 2.0 ; arg1 : Spell Name ; arg2 : Duration (arg2 seems to be in milliseconds ex. 1.5 second cast time shows as 1500) Fired when a spell cast stops. Removed in 2.0 * Called twice when the spell is channelled. Once at start, once at completion. * The only SURE way to determine if a non-instant, non-damaging spell is cast successfully (such as Warlock Banish) is to do the following: # Observe the spell start with UseAction or by trapping CastSpellByName() or one of the other methods of trapping spellcasts. #Wait for SPELLCAST_STOP to arrive. #When it arrives, you know the spell has stopped, but you don't know the reason!! It could be that the spell was cast successfully, or it was resisted, or the target was immune, or you moved. Schedule a success check 1/10th of a second in the future by using GetTime() and the OnUpdate() event callback. #If you get to a 1/10th of a second in the future without recieving SPELLCAST_INTERRUPTED or SPELLCAST_FAILURE, then the spell landed successfully. If one of those other events occured, you can kill your scheduled success check because the spell failed. You could also check for the Banish debuff on the target, but that's a can of worms because the player can switch targets mid cast (which does happen in nutty endgame instances). Fired when: * Spellbook initially loads on client initialization. (Attempting to use GetSpellName before this is complete will result in a UI error. Note: This event happens after ADDON_LOADED and VARIABLES_LOADED.) * Learning new stuff that goes in the spellbook. * Opening the spellbook. * Equipping/Removing/Swapping primary weapon. (Changes the Attack icon) ;arg1 :nil when the char learns stuff. Also when changing weapons and shapeshifting. In addition it seems to be called on regular intervals for no apparent reason. :# when the user opens the spellbook. :'LeftButton' when using the mouse to open the spellbook or to browse through the pages and tabs of the open spellbook. Fired when spell cooldown starts. ; arg1 : if the spell is triggered by keypress, returns the GetTime() output in string format. Otherwise, it will return "LeftButton" or "RightButton" Fires when you enter combat or die. Added in 2.0. Fired when a unit begins channeling in the course of casting a spell. Received for party/raid members as well as the player. ; arg1 : Unit casting the spell Added in 2.0. Fired when a unit stops channeling. Received for party/raid members as well as the player. ; arg1: Unit casting the spell Added in 2.0. Received for party/raid members, as well as the player ; arg1 : Unit casting the spell Added in 2.0. Fired when a unit's spellcast is delayed, including party/raid members or the player ; arg1 : Unit casting the spell Added in 2.0. Fired when a unit's spellcast fails, including party/raid members or the player ; arg1 : Unit casting the spell Added in 2.0. Fired when a unit's spellcast is interrupted, including party/raid members or the player ; arg1 : Unit casting the spell Added in 2.0. Fired when an event is sent to the server. Other messages indicate when the server begins timing or considers the cast successful. ; arg1 : Unit casting the spell ; arg2 : Spell name ; arg3 : Spell rank ; arg4 : Spell target Added in 2.0. Fired when a unit begins casting, including party/raid members or the player ; arg1 : Unit casting the spell Added in 2.0. Fired when a unit stops casting, including party/raid members or the player ; arg1 : Unit casting the spell Added in 2.0. Fired when a spell is cast successfully. Event is received even if spell is resisted. ; arg1 : Unit casting the spell ; arg2 : Spell name ; arg3 : Spell rank Fired when a spell misses ; arg1 : Unit Name - can be 'target' 'mouseover' 'player' or 'party1..4' possibly also 'raid1..40' ; arg2 : Action - can be 'RESISTED' 'DODGED' 'PARRIED' or 'BLOCKED'